package com.naiterui.ehp.bp.domain;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;
import java.io.Serializable;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * @author xuchong
 * @Description drmessageConsultOder 实体
 * @since 1.0
 */
@Data
@Entity
@Table(name = "dr_video_consult")
public class DrVideoConsult implements Serializable {

    /**
     * 全部--视频问诊状态
     */
    public static final int VIDEO_CONSULT_STATUS_ALL = 0;

    /**
     * 待接诊--视频问诊状态
     */
    public static final int VIDEO_CONSULT_STATUS_TO_TREAT = 1;

    /**
     * 进行中--视频问诊状态
     */
    public static final int VIDEO_CONSULT_STATUS_PROCESSING = 2;

    /**
     * 中断--视频问诊状态
     */
    public static final int VIDEO_CONSULT_STATUS_DISCONTINUE = 3;

    /**
     * 已取消--视频问诊状态
     */
    public static final int VIDEO_CONSULT_STATUS_CANCEL = 4;

    /**
     * 已完成--视频问诊状态
     */
    public static final int VIDEO_CONSULT_STATUS_COMPLETE = 5;

    /**
     * 未下单--视频问诊状态（未支付的视频问诊）
     */
    public static final int VIDEO_CONSULT_STATUS_NO_ORDER = 6;

    /**
     * 已支付
     */
    public static final int VIDEO_CONSULT_PAY_SUCCESS = 2;

    // 未付费--付费状态(对应待支付，支付失败)
    public static final int MESSAGE_PAY_STATUS_NO = 0;
    // 已付费--付费状态(对应支付成功)
    public static final int MESSAGE_PAY_STATUS_YES = 1;
    private static final long serialVersionUID = 653098319003253098L;


    // 主键
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    /**
     * 订单号
     */
    @Column(name = "order_sn")
    private String orderSn;

    /**
     * 患者id
     */
    @Column(name = "patient_id")
    private Long patientId;

    /**
     * 就诊人id
     */
    @Column(name = "inquirer_id")
    private Long inquirerId;

    /**
     * 医生id
     */
    @Column(name = "doctor_id")
    private Long doctorId;

    /**
     * 房间号
     */
    @Column(name = "room_id")
    private Integer roomId;

    /**
     * 通话时间（秒）
     */
    @Column(name = "talk_time")
    private Long talkTime;

    /**
     * 支付金额(单位为分)
     */
    @Column(name = "price")
    private Integer price;

    /**
     * 支付状态:1:待支付;2支付成功;3:支付失败;4:支付中;5:关闭5;6退款
     */
    @Column(name = "pay_status")
    private Integer payStatus;

    /**
     * 视频问诊状态 1:待接诊;2:进行中;3:中断;4:已取消;5:已完成;6:未下单
     */
    @Column(name = "video_consult_status")
    private Integer videoConsultStatus;

    /**
     * 拒诊原因id
     */
    @Column(name = "refusal_reason_id")
    private Long refusalReasonId;

    /**
     * 拒诊原因
     */
    @Column(name = "refusal_reason")
    private String refusalReason;

    /**
     * 咨询时间
     */
    @Column(name = "consult_time")
    private Date consultTime;

    /**
     * 是否为待接诊，0:否;1:是
     */
    @Column(name = "is_treat")
    private Integer isTreat;

    /**
     * 病情描述
     */
    @Column(name = "condition_desc")
    private String conditionDesc;

    /**
     * 本次诊断(结束问诊时填写)
     */
    private String diagnosis;

    /**
     * 线下问诊诊断(患者申请问诊时填写)
     */
    @Column(name = "offline_diagnosis")
    private String offlineDiagnosis;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 更新时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 更新人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 版本号
     */
    @Version
    @Column(name = "version")
    private Integer version;
}
